# Contributor: Devin Lin <espidev@gmail.com>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=kweathercore
pkgver=0.7
pkgrel=3
pkgdesc="Library to facilitate retrieval of weather information including forecasts and alerts"
url="https://invent.kde.org/libraries/kweathercore"
arch="all !armhf" # armhf blocked by qt5-qtlocation-dev
license="LGPL-2.0-or-later AND CC-BY-4.0"
depends_dev="
	kholidays5-dev
	ki18n5-dev
	qt5-qtbase-dev
	qt5-qtlocation-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	qt5-qttools-dev
	samurai
	"
_repo_url="https://invent.kde.org/libraries/kweathercore.git"
source="https://download.kde.org/stable/kweathercore/$pkgver/kweathercore-$pkgver.tar.xz"
options="!check" # No tests
subpackages="$pkgname-dev $pkgname-doc"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
385514d6ca499db12f243c443e6815b1a5458f4a87da962ea73c5f324c58614fbc854d21d6e5359ee69e7766e75c9144966fd953639a51a09f56a8461d158da8  kweathercore-0.7.tar.xz
"
